import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from "@/router"
import {createPinia} from "pinia"
import i18n from "@/lang"
const pinia = createPinia()

const app = createApp(App)
// 指令名字focus，页面要使用v-focus
app.directive("focus",(el,binding)=>{
    console.log("el",el);
    console.log("binding",binding);
    el.focus()
})
app.directive("bgcolor",(el,binding)=>{
    console.log("el",el);
    el.style.backgroundColor=binding.value
})
//加载路由插件
app.use(router)
//加载pinia插件
app.use(pinia)
app.use(i18n)
app.mount('#app')

